<script src="../jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="../jquery-ext.js" type="text/javascript"></script>
Logged In.<a href="../logout">Logout</a><br>

<form action="../file/upload" enctype="multipart/form-data" method="post">
	<input type="file" name="file"><input type="submit"/>
	
	</form>
	<hr>
	Update Contcat:
<form action="../user/updateContact" id="contactForm"  method="post">
	qq<input type="text" name="qq" value="11111"><br>
	phone<input type="text" name="phone" value="11111"><br>
	mobile<input type="text" name="mobile" value="11111"><br>
	qqweibo<input type="text" name="qqWeibo" value="@11111"><br>
	
	
	<input type="button" id="updateBtn" value="Submit"/>
	</form>
	
	
			<script>
		 $("#updateBtn").click(function(){
			
			 $.postJSON("../user/updateContact",$("#contactForm").serializeObject(),
					 function (result) {
	        	 alert("Add Contact successful?"+result.errCode+","+result.errMsg) 
	        });
				
			}); 
	</script>
	
	<hr>
	Pay In
	<form id="payinForm"  method="post">
	amount<input type="text" name="amount" value="10.00"><br>
	vendor<input type="text" name="vendor" value="CFT"><br>
	desc<input type="text" name="desc" value="Pay in RMB 10.00"><br>
	<input type="button" id="payinBtn" value="Submit"/>
	</form>
				<script>
		 $("#payinBtn").click(function(){
			
			/*  $.postJSON("../bank/deposit",$("#payinForm").serializeObject(),
					 function (result) {
	        	 alert("Add Contact successful?"+result.status+","+result.msg) 
	        }); */
			 
				  $.post("../bank/preDeposit",$("#payinForm").serializeObject(),
				  function(result){
					  if(result.status==false){
						  alert("Call back success?"+result.errCode+","+result.errMsg) 
						  return;
					  }
					  alert("Prepare WithDrawl successful?"+result.errCode+","+result.extend.referenceNo) 
					  $("#referenceNo").val(result.extend.referenceNo);
				  },
				  "json");
				
			}); 
	</script>
	<hr>
	Pay in call back
	referenceNo<input type="text" id="referenceNo" value="12013061111503400001">
	<input type="button" id="payincallbackBtn" value="Submit"/>
		<script>
		 $("#payincallbackBtn").click(function(){
			
			  $.get("../bank/depositCallback?vendor=CFT&replyContent=test replay&referenceNo="+$("#referenceNo").val(), function(result){
			   alert("Call back success?"+result.errCode+","+result.errMsg) 
			  });
			}); 
	</script>
	<hr>
	Pay out
	<form id="payoutForm"  method="post">
	amount<input type="text" name="amount" value="10.00"><br>
	vendor<input type="text" name="vendor" value="CFT"><br>
	desc<input type="text" name="desc" value="Pay in RMB 10.00"><br>
	<input type="button" id="payoutBtn" value="Submit"/>
	</form>
				<script>
		 $("#payoutBtn").click(function(){
			
				  $.post("../bank/preWithdrawl",$("#payoutForm").serializeObject(),
				  function(result){
					  if(result.status==false){
						  alert("Call back success?"+result.status+","+result.msg) 
						  return;
					  }
					  alert("Withdrawl successful?"+result.status+","+result.extend.referenceNo) 
					  $("#referenceNo1").val(result.extend.referenceNo);
				  },
				  "json");
				
			}); 
	</script>
	<hr>
	Pay out call back
	referenceNo<input type="text" id="referenceNo1" value="12013061111503400001">
	<input type="button" id="payoutcallbackBtn" value="Submit"/>
		<script>
		 $("#payoutcallbackBtn").click(function(){
			
			  $.get("../bank/withdrawlCallback?vendor=CFT&replyContent=test replay&referenceNo="+$("#referenceNo1").val(), function(result){
			   alert("Call back success?"+result.status+","+result.msg) 
			  });
			}); 
	</script>
